import request from '@/utils/request'

/* 个人中心 */
export function getProfile(params) {
  return request({
    url: '/mine/profile',
    method: 'get',
    params
  })
}

/* 个人中心-保存 */
export function saveProfile(data) {
  return request({
    url: '/mine/profile/save',
    method: 'post',
    data
  })
}

/* APP1.0 - 保存密码 */
export function savePass(data) {
  return request({
    url: '/mine/savepass',
    method: 'post',
    data
  })
}

/* 选择科目 */
export function saveSubjects(data) {
  return request({
    url: '/common/subjects/save',
    method: 'post',
    data
  })
}

/* 收货地址-获取 */
export function getAddress(params) {
  return request({
    url: '/mine/address/list',
    method: 'get',
    params
  })
}

/* 收货地址-新增 */
export function addAddress(data) {
  return request({
    url: '/mine/address/idadd',
    method: 'post',
    data
  })
}

/* 收货地址-编辑 */
export function saveAddress(data) {
  return request({
    url: '/mine/address/idsave',
    method: 'post',
    data
  })
}

/* 收货地址-删除 */
export function delAddress(params) {
  return request({
    url: '/mine/address/idremove',
    method: 'get',
    params
  })
}
